
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>017集合2 · 书名</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="作者">
        <meta name="identifier" content="图书编号" scheme="ISBN">
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-intopic-toc/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="018泛型.html" />
    
    
    <link rel="prev" href="017集合.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    书名
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Books</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <span>
            
                    
                    Java
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="001环境变量.html">
            
                <a href="001环境变量.html">
            
                    
                    001环境变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="002Java初体验.html">
            
                <a href="002Java初体验.html">
            
                    
                    002Java初体验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="003变量命名及数据类型.html">
            
                <a href="003变量命名及数据类型.html">
            
                    
                    003变量命名及数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="004运算符.html">
            
                <a href="004运算符.html">
            
                    
                    004运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="005选择结构.html">
            
                <a href="005选择结构.html">
            
                    
                    005选择结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="006循环结构.html">
            
                <a href="006循环结构.html">
            
                    
                    006循环结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="007数组.html">
            
                <a href="007数组.html">
            
                    
                    007数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="008类和对象方法.html">
            
                <a href="008类和对象方法.html">
            
                    
                    008类和对象方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="009构造方法.html">
            
                <a href="009构造方法.html">
            
                    
                    009构造方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="010封装与关键字static.html">
            
                <a href="010封装与关键字static.html">
            
                    
                    010封装与关键字Static
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.11" data-path="011 继承.html">
            
                <a href="011 继承.html">
            
                    
                    011 继承
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.12" data-path="012方法重写.html">
            
                <a href="012方法重写.html">
            
                    
                    012方法重写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.13" data-path="013多态.html">
            
                <a href="013多态.html">
            
                    
                    013多态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.14" data-path="014抽象类抽象方法.html">
            
                <a href="014抽象类抽象方法.html">
            
                    
                    014抽象类抽象方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.15" data-path="015接口.html">
            
                <a href="015接口.html">
            
                    
                    015接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.16" data-path="016异常.html">
            
                <a href="016异常.html">
            
                    
                    016异常
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.17" data-path="017集合.html">
            
                <a href="017集合.html">
            
                    
                    017集合
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.1.18" data-path="017集合2.html">
            
                <a href="017集合2.html">
            
                    
                    017集合2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.19" data-path="018泛型.html">
            
                <a href="018泛型.html">
            
                    
                    018泛型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.20" data-path="019Collections算法类.html">
            
                <a href="019Collections算法类.html">
            
                    
                    019Collections算法类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.21" data-path="020枚举.html">
            
                <a href="020枚举.html">
            
                    
                    020枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.22" data-path="021包装类.html">
            
                <a href="021包装类.html">
            
                    
                    021包装类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.23" data-path="022常用类.html">
            
                <a href="022常用类.html">
            
                    
                    022常用类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.24" data-path="023File类.html">
            
                <a href="023File类.html">
            
                    
                    023File类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.25" data-path="024IO流.html">
            
                <a href="024IO流.html">
            
                    
                    024IO流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.26" data-path="025多线程.html">
            
                <a href="025多线程.html">
            
                    
                    025多线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.27" data-path="025多线程线程池.html">
            
                <a href="025多线程线程池.html">
            
                    
                    025多线程线程池
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.28" data-path="026网络编程Socket.html">
            
                <a href="026网络编程Socket.html">
            
                    
                    026网络编程Socket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.29" data-path="027XML解析.html">
            
                <a href="027XML解析.html">
            
                    
                    027XML解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.30" data-path="028 注解.html">
            
                <a href="028 注解.html">
            
                    
                    028 注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.31" data-path="029 Lambda表达式.html">
            
                <a href="029 Lambda表达式.html">
            
                    
                    029 Lambda表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.32" data-path="029 反射.html">
            
                <a href="029 反射.html">
            
                    
                    029 反射
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
                <span>
            
                    
                    Mybatis
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="../mybatis/MyBatis.html">
            
                <a href="../mybatis/MyBatis.html">
            
                    
                    MyBatis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" >
            
                <span>
            
                    
                    MyBatis
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" >
            
                <span>
            
                    
                    Mysql
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../mysql/01 SQL通用语法.html">
            
                <a href="../mysql/01 SQL通用语法.html">
            
                    
                    01 SQL通用语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../mysql/02 DDL.html">
            
                <a href="../mysql/02 DDL.html">
            
                    
                    02 DDL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../mysql/03 DML.html">
            
                <a href="../mysql/03 DML.html">
            
                    
                    03 DML
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.4" data-path="../mysql/04 DQL.html">
            
                <a href="../mysql/04 DQL.html">
            
                    
                    04 DQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.5" data-path="../mysql/05 DCL.html">
            
                <a href="../mysql/05 DCL.html">
            
                    
                    05 DCL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.6" data-path="../mysql/06 函数.html">
            
                <a href="../mysql/06 函数.html">
            
                    
                    06 函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.7" data-path="../mysql/07 约束.html">
            
                <a href="../mysql/07 约束.html">
            
                    
                    07 约束
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.8" data-path="../mysql/08 多表查询.html">
            
                <a href="../mysql/08 多表查询.html">
            
                    
                    08 多表查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.9" data-path="../mysql/09 事务.html">
            
                <a href="../mysql/09 事务.html">
            
                    
                    09 事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.10" data-path="../mysql/999zzz.html">
            
                <a href="../mysql/999zzz.html">
            
                    
                    999zzz
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.11" data-path="../mysql/MySql.html">
            
                <a href="../mysql/MySql.html">
            
                    
                    MySql
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.12" data-path="../mysql/sql.html">
            
                <a href="../mysql/sql.html">
            
                    
                    Sql
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" >
            
                <span>
            
                    
                    Spring
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="../spring/spring.html">
            
                <a href="../spring/spring.html">
            
                    
                    Spring
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" >
            
                <span>
            
                    
                    SpringMVC
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="../springMVC/springMVC.html">
            
                <a href="../springMVC/springMVC.html">
            
                    
                    SpringMVC
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" >
            
                <span>
            
                    
                    整合
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1" data-path="../整合/Mybatis框架.html">
            
                <a href="../整合/Mybatis框架.html">
            
                    
                    Mybatis框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.2" data-path="../整合/SpringBoot.html">
            
                <a href="../整合/SpringBoot.html">
            
                    
                    SpringBoot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.3" data-path="../整合/springmvc框架.html">
            
                <a href="../整合/springmvc框架.html">
            
                    
                    Springmvc框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.4" data-path="../整合/spring框架.html">
            
                <a href="../整合/spring框架.html">
            
                    
                    Spring框架
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >017集合2</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p><strong>&#x6982;&#x8FF0;</strong>
&#x5148;&#x6765;&#x4E00;&#x5F20;Java&#x4E2D;&#x7684;&#x96C6;&#x5408;&#x6846;&#x67B6;&#x56FE;</p>
<p><img src="https://img-blog.csdnimg.cn/20210116211134914.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2NTQwNzM4,size_16,color_FFFFFF,t_70#pic_center" alt=""></p>
<p>&#x7531;&#x4E0A;&#x56FE;&#x53EF;&#x77E5;&#xFF0C;Java&#x96C6;&#x5408;&#x6846;&#x67B6;&#x5305;&#x542B;&#x4E09;&#x5927;&#x5757;&#x5185;&#x5BB9;&#xFF1A;&#x5BF9;&#x5916;&#x7684;&#x63A5;&#x53E3;&#x3001;&#x63A5;&#x53E3;&#x7684;&#x5B9E;&#x73B0;&#x3001;&#x5BF9;&#x96C6;&#x5408;&#x8FD0;&#x7B97;&#x7684;&#x7B97;&#x6CD5;&#x3002;&#x603B;&#x7ED3;&#x6210;&#x4E00;&#x4E2A;&#x8868;&#x683C;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x63A5;&#x53E3;</th>
<th>&#x662F;&#x5426;&#x552F;&#x4E00;</th>
<th style="text-align:left">&#x662F;&#x5426;&#x6709;&#x5E8F;</th>
</tr>
</thead>
<tbody>
<tr>
<td>List</td>
<td>&#x4E0D;&#x552F;&#x4E00;&#xFF08;&#x91CD;&#x590D;&#xFF09;</td>
<td style="text-align:left">&#x6709;&#x5E8F;</td>
</tr>
<tr>
<td>Set</td>
<td>&#x552F;&#x4E00;&#xFF08;&#x4E0D;&#x91CD;&#x590D;&#xFF09;</td>
<td style="text-align:left">&#x65E0;&#x5E8F;</td>
</tr>
<tr>
<td>Map</td>
<td>key&#xFF1A;&#x552F;&#x4E00; value&#xFF1A;&#x4E0D;&#x552F;&#x4E00;</td>
<td style="text-align:left">key&#xFF1A;&#x65E0;&#x5E8F; value&#xFF1A;&#x65E0;&#x5E8F;</td>
</tr>
</tbody>
</table>
<p><strong>List&#x63A5;&#x53E3;</strong>
List&#x63A5;&#x53E3;&#x6709;&#x4E24;&#x4E2A;&#x5B9E;&#x73B0;&#xFF0C;&#x5206;&#x522B;&#x662F;&#xFF1A;</p>
<p><strong>ArrayList</strong>
&#x7279;&#x70B9;&#xFF1A;
&#x5B58;&#x50A8;&#x65B9;&#x5F0F;&#x4E0E;&#x6570;&#x7EC4;&#x76F8;&#x540C;&#xFF0C;&#x5141;&#x8BB8;&#x91CD;&#x590D;&#x3001;&#x6709;&#x5E8F;&#xFF0C;&#x4F46;&#x662F;&#x6570;&#x7EC4;&#x7684;&#x957F;&#x5EA6;&#x4E0D;&#x53EF;&#x53D8;&#xFF0C;ArrayList&#x96C6;&#x5408;&#x957F;&#x5EA6;&#x53EF;&#x4EE5;&#x6539;&#x53D8;&#xFF0C;&#x9ED8;&#x8BA4;&#x5927;&#x5C0F;&#x662F;10&#x3002;&#x4F18;&#x70B9;&#xFF1A;&#x904D;&#x5386;&#x5143;&#x7D20;&#x548C;&#x968F;&#x673A;&#x8BBF;&#x95EE;&#x5143;&#x7D20;&#x7684;&#x6548;&#x7387;&#x6BD4;&#x8F83;&#x9AD8;&#x3002;</p>
<p>&#x5B58;&#x50A8;&#x65B9;&#x5F0F;&#x793A;&#x610F;&#x56FE;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
</tr>
</thead>
<tbody>
<tr>
<td>aaa</td>
<td>bbb</td>
<td>ccc</td>
<td>ddd</td>
<td>eee</td>
<td>www</td>
<td>sss</td>
</tr>
</tbody>
</table>
<p><strong>&#x5E38;&#x7528;&#x65B9;&#x6CD5;</strong></p>
<table>
<thead>
<tr>
<th>&#x65B9;&#x6CD5;&#x540D;&#x79F0;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>boolean add(Object o)</td>
<td>&#x5728;&#x5217;&#x8868;&#x672B;&#x5C3E;&#x987A;&#x5E8F;&#x6DFB;&#x52A0;&#x5143;&#x7D20;&#xFF0C;&#x8D77;&#x59CB;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x4ECE;0&#x5F00;&#x59CB;</td>
</tr>
<tr>
<td>void add(int index,Object o)</td>
<td>&#x5728;&#x6307;&#x5B9A;&#x7684;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x6DFB;&#x52A0;&#x5143;&#x7D20;&#xFF0C;&#x539F;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x53CA;&#x5176;&#x540E;&#x9762;&#x7684;&#x5143;&#x7D20;&#x4F9D;&#x6B21;&#x540E;&#x79FB;&#x3002;&#x6CE8;&#x610F;&#xFF1A;&#x65B0;&#x6DFB;&#x52A0;&#x5143;&#x7D20;&#x7684;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x5FC5;&#x987B;&#x4ECB;&#x4E8E;0&#x548C;&#x5217;&#x8868;&#x4E2D;&#x5143;&#x7D20;&#x4E2A;&#x6570;&#x4E4B;&#x95F4;</td>
</tr>
<tr>
<td>int size()</td>
<td>&#x8FD4;&#x56DE;&#x5217;&#x8868;&#x4E2D;&#x5143;&#x7D20;&#x4E2A;&#x6570;</td>
</tr>
<tr>
<td>Object get(int idnex)</td>
<td>&#x8FD4;&#x56DE;&#x6307;&#x5B9A;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x5904;&#x7684;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>boolean contains(Object o)</td>
<td>&#x5224;&#x65AD;&#x5217;&#x8868;&#x4E2D;&#x662F;&#x5426;&#x5B58;&#x5728;&#x6307;&#x5B9A;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>boolean remove(Object o)</td>
<td>&#x4ECE;&#x5217;&#x8868;&#x4E2D;&#x5220;&#x9664;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>Object remobe(int index)</td>
<td>&#x4ECE;&#x5217;&#x8868;&#x4E2D;&#x5220;&#x9664;&#x6307;&#x5B9A;&#x4F4D;&#x7F6E;&#x5143;&#x7D20;&#xFF0C;&#x8D77;&#x59CB;&#x7D22;&#x5F15;&#x4F4D;&#x7F6E;&#x4ECE;0&#x5F00;&#x59CB;</td>
</tr>
</tbody>
</table>
<p><strong>LinkedList</strong>
&#x7279;&#x70B9;&#xFF1A;
&#x91C7;&#x7528;&#x94FE;&#x8868;&#x5B58;&#x50A8;&#x65B9;&#x5F0F;&#x3002;&#x4F18;&#x70B9;&#xFF1A;&#x63D2;&#x5165;&#x3001;&#x5220;&#x9664;&#x5143;&#x7D20;&#x65F6;&#x6548;&#x7387;&#x8F83;&#x9AD8;&#x3002;</p>
<p>&#x5B58;&#x50A8;&#x65B9;&#x5F0F;&#x793A;&#x610F;&#x56FE;&#xFF1A;</p>
<p><img src="https://img-blog.csdnimg.cn/20210116213931495.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2NTQwNzM4,size_16,color_FFFFFF,t_70#pic_center" alt=""></p>
<p>LinkedList&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;&#x5143;&#x7D20;&#x662F;&#x901A;&#x8FC7;&#x5730;&#x5740;&#x4E92;&#x76F8;&#x8FDE;&#x63A5;&#xFF0C;&#x6BD4;&#x5982;&#xFF1A;&#x7B2C;2&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x5730;&#x5740;&#x5C31;&#x5728;&#x7B2C;&#x4E00;&#x4E2A;&#x6570;&#x636E;&#x4E2D;&#x5B58;&#x50A8;&#x7740;&#xFF0C;&#x65B9;&#x4FBF;&#x627E;&#x5230;&#xFF0C;&#x60CA;&#x9192;&#x63D2;&#x5165;&#x3001;&#x5220;&#x9664;&#x3002;</p>
<p><strong>&#x5E38;&#x7528;&#x65B9;&#x6CD5;</strong></p>
<table>
<thead>
<tr>
<th>&#x65B9;&#x6CD5;&#x540D;&#x79F0;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>void addFirst(Object o)</td>
<td>&#x5728;&#x5217;&#x8868;&#x7684;&#x9996;&#x90E8;&#x6DFB;&#x52A0;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>void addLast(Object o)</td>
<td>&#x5728;&#x5217;&#x8868;&#x7684;&#x672B;&#x5C3E;&#x6DFB;&#x52A0;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>Object getFirst()</td>
<td>&#x8FD4;&#x56DE;&#x5217;&#x8868;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>Object getLast()</td>
<td>&#x8FD4;&#x56DE;&#x5217;&#x8868;&#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>Object removeFirst()</td>
<td>&#x5220;&#x9664;&#x5E76;&#x8FD4;&#x56DE;&#x5217;&#x8868;&#x4E2D;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x5143;&#x7D20;</td>
</tr>
<tr>
<td>Object removeLast()</td>
<td>&#x5220;&#x9664;&#x5E76;&#x8FD4;&#x56DE;&#x5217;&#x8868;&#x4E2D;&#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;</td>
</tr>
</tbody>
</table>
<h2 id="map&#x63A5;&#x53E3;">Map&#x63A5;&#x53E3;</h2>
<h3 id="hashmap&#x96C6;&#x5408;">HashMap&#x96C6;&#x5408;</h3>
<h4 id="&#x7279;&#x70B9;&#xFF1A;">&#x7279;&#x70B9;&#xFF1A;</h4>
<p>&#x5B58;&#x50A8;&#x4E00;&#x7EC4;&#x6210;&#x5BF9;&#x7684;&#x952E;-&#x503C;&#x5BF9;&#x8C61;&#xFF0C;&#x53EF;&#x4F9B;key&#xFF08;&#x952E;&#xFF09;&#x5230;value&#xFF08;&#x503C;&#xFF09;&#x7684;&#x6620;&#x5C04;&#x3002;&#x4F18;&#x70B9;&#xFF1A;&#x67E5;&#x8BE2;&#x6307;&#x5B9A;&#x5143;&#x7D20;&#x6548;&#x7387;&#x9AD8;&#x3002;</p>
<h4 id="&#x5E38;&#x7528;&#x65B9;&#x6CD5;">&#x5E38;&#x7528;&#x65B9;&#x6CD5;</h4>
<table>
<thead>
<tr>
<th>&#x65B9;&#x6CD5;&#x540D;&#x79F0;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>Object put(Object key,Object value)</td>
<td>&#x4EE5;&#x201C;&#x952E;-&#x503C;&#x201D;&#x5BF9;&#x7684;&#x65B9;&#x5F0F;&#x5B58;&#x50A8;&#xFF0C;&#x6CE8;&#x610F;&#xFF1A;&#x952E;&#x5FC5;&#x987B;&#x552F;&#x4E00;&#xFF0C;&#x503C;&#x53EF;&#x4EE5;&#x91CD;&#x590D;&#x3002;&#x5982;&#x679C;&#x8BD5;&#x56FE;&#x6DFB;&#x52A0;&#x91CD;&#x590D;&#x7684;&#x952E;&#xFF0C;&#x90A3;&#x4E48;&#x6700;&#x540E;&#x52A0;&#x5165;&#x7684;&#x201C;&#x952E;-&#x503C;&#x5BF9;&#x201D;&#x5C06;&#x66FF;&#x6362;&#x6389;&#x539F;&#x5148;&#x7684;&#x201C;&#x952E;&#x503C;&#x5BF9;&#x201D;</td>
</tr>
<tr>
<td>Object get(Object key)</td>
<td>&#x6839;&#x636E;&#x952E;&#x8FD4;&#x56DE;&#x76F8;&#x5173;&#x8054;&#x7684;&#x503C;&#xFF0C;&#x82E5;&#x4E0D;&#x5B58;&#x5728;&#x6307;&#x5B9A;&#x7684;&#x952E;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;null</td>
</tr>
<tr>
<td>Object remove(Object key)</td>
<td>&#x6839;&#x5220;&#x9664;&#x6307;&#x5B9A;&#x7684;&#x952E;&#x6620;&#x5C04;&#x7684;&#x201C;&#x952E;-&#x503C;&#x5BF9;&#x201D;</td>
</tr>
<tr>
<td>int size()</td>
<td>&#x8FD4;&#x56DE;&#x5143;&#x7D20;&#x4E2A;&#x6570;</td>
</tr>
<tr>
<td>Set keySet()</td>
<td>&#x8FD4;&#x56DE;&#x952E;&#x7684;&#x96C6;&#x5408;</td>
</tr>
<tr>
<td>Collection values()</td>
<td>&#x8FD4;&#x56DE;&#x503C;&#x7684;&#x96C6;&#x5408;</td>
</tr>
<tr>
<td>boolean containsKey(Object key)</td>
<td>&#x82E5;&#x5B58;&#x5728;&#x6307;&#x5B9A;&#x7684;&#x952E;&#x6620;&#x5C04;&#x7684;&#x201C;&#x952E;-&#x503C;&#x5BF9;&#x201D;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;true</td>
</tr>
<tr>
<td>boolean isEmpty()</td>
<td>&#x82E5;&#x4E0D;&#x5B58;&#x5728;&#x952E;-&#x503C;&#x6620;&#x5C04;&#x5173;&#x7CFB;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;true</td>
</tr>
<tr>
<td>void clear()</td>
<td>&#x4ECE;&#x6B64;&#x6620;&#x5C04;&#x4E2D;&#x5220;&#x9664;&#x6240;&#x6709;&#x6620;&#x5C04;&#x5173;&#x7CFB;</td>
</tr>
</tbody>
</table>
<h1 id="&#x8FED;&#x4EE3;&#x5668;iterator">&#x8FED;&#x4EE3;&#x5668;Iterator</h1>
<p>&#x6240;&#x6709;&#x96C6;&#x5408;&#x63A5;&#x53E3;&#x548C;&#x7C7B;&#x90FD;&#x6CA1;&#x6709;&#x63D0;&#x4F9B;&#x76F8;&#x5E94;&#x7684;&#x904D;&#x5386;&#x65B9;&#x6CD5;&#xFF0C;&#x800C;&#x662F;&#x628A;&#x904D;&#x5386;&#x4EA4;&#x7ED9;&#x8FED;&#x4EE3;&#x5668;Iterator&#x5B8C;&#x6210;&#x3002;Iterator&#x4E3A;&#x96C6;&#x5408;&#x800C;&#x751F;&#xFF0C;&#x4E13;&#x95E8;&#x5B9E;&#x73B0;&#x96C6;&#x5408;&#x7684;&#x904D;&#x5386;&#x3002;Iterator&#x6709;&#x4E24;&#x4E2A;&#x65B9;&#x6CD5;&#x53EF;&#x4EE5;&#x5B9E;&#x73B0;&#x904D;&#x5386;&#xFF1A;</p>
<ol>
<li>boolean hasNext()&#xFF1A;&#x5224;&#x65AD;&#x662F;&#x5426;&#x5B58;&#x5728;&#x53E6;&#x4E00;&#x4E2A;&#x53EF;&#x8BBF;&#x95EE;&#x7684;&#x5143;&#x7D20;&#x3002;</li>
<li>Object next():&#x8FD4;&#x56DE;&#x8981;&#x8BBF;&#x95EE;&#x7684;&#x4E0B;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x3002;</li>
</ol>
<p>&#x6765;&#x4E2A;&#x5C0F;&#x6848;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Pet</span> </span>{
    <span class="hljs-keyword">protected</span> String name = <span class="hljs-string">&quot;&#x65E0;&#x540D;&#x6C0F;&quot;</span>;
    <span class="hljs-keyword">protected</span> <span class="hljs-keyword">int</span> health = <span class="hljs-number">100</span>;
    <span class="hljs-keyword">protected</span> <span class="hljs-keyword">int</span> love = <span class="hljs-number">0</span>;
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-title">Pet</span><span class="hljs-params">(String name)</span></span>{
        <span class="hljs-keyword">this</span>.name = name;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getName</span><span class="hljs-params">()</span> </span>{
        <span class="hljs-keyword">return</span> name;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setName</span><span class="hljs-params">(String name)</span> </span>{
        <span class="hljs-keyword">this</span>.name = name;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span> <span class="hljs-title">getHealth</span><span class="hljs-params">()</span> </span>{
        <span class="hljs-keyword">return</span> health;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setHealth</span><span class="hljs-params">(<span class="hljs-keyword">int</span> health)</span> </span>{
        <span class="hljs-keyword">this</span>.health = health;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span> <span class="hljs-title">getLove</span><span class="hljs-params">()</span> </span>{
        <span class="hljs-keyword">return</span> love;
    }
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setLove</span><span class="hljs-params">(<span class="hljs-keyword">int</span> love)</span> </span>{
        <span class="hljs-keyword">this</span>.love = love;
    }
    <span class="hljs-comment">/**
     * &#x8F93;&#x51FA;&#x5BA0;&#x7269;&#x4FE1;&#x606F;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">print</span><span class="hljs-params">()</span></span>{
        System.out.println(<span class="hljs-string">&quot;&#x5BA0;&#x7269;&#x7684;&#x81EA;&#x767D;&#xFF1A;\n&#x6211;&#x7684;&#x540D;&#x5B57;&#x53EB;&quot;</span>+<span class="hljs-keyword">this</span>.name+<span class="hljs-string">&quot;,&#x5065;&#x5EB7;&#x503C;&#x662F;&quot;</span>+<span class="hljs-keyword">this</span>.health+
                <span class="hljs-string">&quot;&#xFF0C;&#x548C;&#x4E3B;&#x4EBA;&#x7684;&#x5176;&#x5BC6;&#x5EA6;&#x662F;&quot;</span>+<span class="hljs-keyword">this</span>.love+<span class="hljs-string">&quot;&#x3002;&quot;</span>);
    }
    <span class="hljs-comment">/**
     * &#x62BD;&#x8C61;&#x65B9;&#x6CD5;eat&#xFF08;&#xFF09;&#xFF0C;&#x8D1F;&#x8D23;&#x5BA0;&#x7269;&#x5403;&#x996D;&#x529F;&#x80FD;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-keyword">void</span> <span class="hljs-title">eat</span><span class="hljs-params">()</span></span>;
}
</code></pre>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Dog</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Pet</span></span>{
    <span class="hljs-keyword">public</span> String strain;<span class="hljs-comment">//&#x54C1;&#x79CD;</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-title">Dog</span><span class="hljs-params">(String name,String strain)</span></span>{
        <span class="hljs-keyword">super</span>(name);
        <span class="hljs-keyword">this</span>.strain = strain;
    }
    <span class="hljs-comment">/**
     * &#x91CD;&#x5199;&#x7236;&#x7C7B;&#x7684;print&#x65B9;&#x6CD5;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">print</span><span class="hljs-params">()</span></span>{
        <span class="hljs-keyword">super</span>.print();
        System.out.println(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x4E00;&#x53EA;&#xFF1A;&quot;</span>+<span class="hljs-keyword">this</span>.strain+<span class="hljs-string">&quot;&#x3002;&quot;</span>);
    }
    <span class="hljs-comment">/**
     * &#x5B9E;&#x73B0;&#x72D7;&#x72D7;&#x5403;&#x996D;&#x7684;&#x65B9;&#x6CD5;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">eat</span><span class="hljs-params">()</span></span>{
        <span class="hljs-keyword">super</span>.health +=<span class="hljs-number">3</span>;
        System.out.println(<span class="hljs-string">&quot;&#x72D7;&#x72D7;&quot;</span>+<span class="hljs-keyword">super</span>.name+<span class="hljs-string">&quot;&#x5403;&#x9971;&#x4E86;&#xFF0C;&#x5065;&#x5EB7;&#x503C;&#x589E;&#x52A0;3&#x3002;&quot;</span>);
    }
    <span class="hljs-comment">/**
     * &#x5B9E;&#x73B0;&#x98DE;&#x76D8;&#x529F;&#x80FD;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">catchingFlyDisc</span><span class="hljs-params">()</span></span>{
        System.out.println(<span class="hljs-string">&quot;&#x72D7;&#x72D7;&quot;</span>+<span class="hljs-keyword">super</span>.name+<span class="hljs-string">&quot;&#x6B63;&#x5728;&#x63A5;&#x98DE;&#x76D8;&quot;</span>);
        <span class="hljs-keyword">super</span>.health+=<span class="hljs-number">10</span>;
        <span class="hljs-keyword">super</span>.love+=<span class="hljs-number">5</span>;
    }
}
</code></pre>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test5</span> </span>{
<span class="hljs-comment">/**
 * <span class="hljs-doctag">@param</span> args
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
    <span class="hljs-comment">// TODO Auto-generated method stub</span>
    <span class="hljs-comment">//&#x521B;&#x5EFA;4&#x4E2A;&#x72D7;&#x72D7;&#x5BF9;&#x8C61;</span>
    Dog ououDog = <span class="hljs-keyword">new</span> Dog(<span class="hljs-string">&quot;&#x5076;&#x5076;&quot;</span>, <span class="hljs-string">&quot;&#x96EA;&#x745E;&#x7EB3;1&quot;</span>);
    Dog yayaDog = <span class="hljs-keyword">new</span> Dog(<span class="hljs-string">&quot;&#x4E2B;&#x4E2B;&quot;</span>, <span class="hljs-string">&quot;&#x96EA;&#x745E;&#x7EB3;2&quot;</span>);
    Dog meimeiDog = <span class="hljs-keyword">new</span> Dog(<span class="hljs-string">&quot;&#x7F8E;&#x7F8E;&quot;</span>, <span class="hljs-string">&quot;&#x96EA;&#x745E;&#x7EB3;3&quot;</span>);
    Dog feifeiDog = <span class="hljs-keyword">new</span> Dog(<span class="hljs-string">&quot;&#x83F2;&#x83F2;&quot;</span>, <span class="hljs-string">&quot;&#x96EA;&#x745E;&#x7EB3;4&quot;</span>);
    <span class="hljs-comment">//&#x521B;&#x5EFA;Map&#x96C6;&#x5408;&#x5BF9;&#x8C61;&#x5E76;&#x628A;&#x591A;&#x4E2A;&#x72D7;&#x72D7;&#x5BF9;&#x8C61;&#x653E;&#x5165;&#x5176;&#x4E2D;</span>
    Map dog = <span class="hljs-keyword">new</span> HashMap();
    dog.put(ououDog.getName(), ououDog);
    dog.put(yayaDog.getName(), yayaDog);
    dog.put(meimeiDog.getName(), meimeiDog);
    dog.put(feifeiDog.getName(), feifeiDog);
    <span class="hljs-comment">//&#x901A;&#x8FC7;&#x8FED;&#x4EE3;&#x5668;&#x4F9D;&#x6B21;&#x8F93;&#x5165;&#x96C6;&#x5408;&#x4E2D;&#x6240;&#x6709;&#x72D7;&#x72D7;&#x7684;&#x4FE1;&#x606F;</span>
    Set keys = dog.keySet();<span class="hljs-comment">//&#x62FF;&#x5230;&#x96C6;&#x5408;&#x4E2D;&#x6240;&#x6709;key&#x7684;&#x96C6;&#x5408;</span>
    Iterator iterator = keys.iterator();<span class="hljs-comment">//&#x83B7;&#x53D6;Iterator&#x5BF9;&#x8C61;</span>
    <span class="hljs-keyword">while</span> (iterator.hasNext()) {<span class="hljs-comment">//&#x5224;&#x65AD;&#x662F;&#x5426;&#x5B58;&#x5728;&#x53EF;&#x8BBF;&#x95EE;&#x7684;&#x5143;&#x7D20;</span>
        String keyString = (String)iterator.next();<span class="hljs-comment">//&#x62FF;&#x5230;&#x8FED;&#x4EE3;&#x5668;&#x4E2D;&#x7684;key&#x503C;</span>
        Dog dog2 = (Dog)dog.get(keyString);<span class="hljs-comment">//&#x6839;&#x636E;key&#x53D6;&#x51FA;&#x5BF9;&#x5E94;&#x7684;&#x503C;</span>
        System.out.println(keyString+<span class="hljs-string">&quot;\t&quot;</span>+dog2.strain);

    }
}
}
</code></pre>
<p>&#x8FD0;&#x884C;&#x7ED3;&#x679C;&#x662F;&#xFF1A;</p>
<pre><code class="lang-java">&#x4E2B;&#x4E2B;   &#x96EA;&#x745E;&#x7EB3;<span class="hljs-number">2</span>
&#x5076;&#x5076;   &#x96EA;&#x745E;&#x7EB3;<span class="hljs-number">1</span>
&#x83F2;&#x83F2;   &#x96EA;&#x745E;&#x7EB3;<span class="hljs-number">4</span>
&#x7F8E;&#x7F8E;   &#x96EA;&#x745E;&#x7EB3;<span class="hljs-number">3</span>
</code></pre>
<p><strong>Set&#x63A5;&#x53E3;</strong>
<strong>HashSet&#x96C6;&#x5408;</strong>
<strong>&#x7279;&#x70B9;&#xFF1A;</strong>
<strong>&#x4F18;&#x70B9;&#xFF1A;HashSet&#x5177;&#x6709;&#x53BB;&#x91CD;&#x529F;&#x80FD;&#x3002;</strong></p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Demo01</span> </span>{
    <span class="hljs-comment">/**
     * Set&#x96C6;&#x5408; &#x7279;&#x70B9;: &#x65E0;&#x5E8F;(&#x6CA1;&#x6709;&#x4E0B;&#x6807;)&#x3001;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x5143;&#x7D20;&#x4E0D;&#x91CD;&#x590D; hashset&#x5177;&#x6709;&#x53BB;&#x91CD;&#x529F;&#x80FD;
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-comment">// &#x521B;&#x5EFA;&#x4E00;&#x4E2A;hashset &#x4FDD;&#x5B58; f f a a b b d d</span>
        HashSet&lt;String&gt; set = <span class="hljs-keyword">new</span> HashSet&lt;&gt;();
        set.add(<span class="hljs-string">&quot;f&quot;</span>);
        set.add(<span class="hljs-string">&quot;f&quot;</span>);
        set.add(<span class="hljs-string">&quot;a&quot;</span>);
        set.add(<span class="hljs-string">&quot;a&quot;</span>);
        set.add(<span class="hljs-string">&quot;b&quot;</span>);
        set.add(<span class="hljs-string">&quot;b&quot;</span>);
        set.add(<span class="hljs-string">&quot;d&quot;</span>);
        set.add(<span class="hljs-string">&quot;d&quot;</span>);
        <span class="hljs-comment">// &#x589E;&#x5F3A;for&#x5FAA;&#x73AF;</span>
        <span class="hljs-keyword">for</span> (String string : set) {
            System.out.println(string);<span class="hljs-comment">// &#x6253;&#x5370;&#x7ED3;&#x679C; a b d f &#xFF0C;&#x53BB;&#x91CD;&#x4E14;&#x65E0;&#x5E8F;(&#x4E0D;&#x662F;&#x6309;&#x7167;&#x8F93;&#x51FA;&#x987A;&#x5E8F;&#x6253;&#x5370;)</span>
        }
    }
}
</code></pre>
<pre><code class="lang-java">a
b
d
f
</code></pre>
<h1 id="&#x96C6;&#x5408;&#x548C;&#x6570;&#x7EC4;&#x7684;&#x533A;&#x522B;">&#x96C6;&#x5408;&#x548C;&#x6570;&#x7EC4;&#x7684;&#x533A;&#x522B;</h1>
<p>1.&#x6570;&#x7EC4;&#x53EF;&#x4EE5;&#x5B58;&#x50A8;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x548C;&#x5BF9;&#x8C61;&#xFF0C;&#x800C;&#x96C6;&#x5408;&#x4E2D;&#x53EA;&#x80FD;&#x5B58;&#x50A8;&#x5BF9;&#x8C61;&#xFF08;&#x53EF;&#x4EE5;&#x4EE5;&#x5305;&#x88C5;&#x7C7B;&#x5F62;&#x5F0F;&#x5B58;&#x50A8;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF09;&#x3002;</p>
<ol>
<li>&#x6570;&#x7EC4;&#x957F;&#x5EA6;&#x56FA;&#x5B9A;&#xFF0C;&#x96C6;&#x5408;&#x957F;&#x5EA6;&#x53EF;&#x4EE5;&#x52A8;&#x6001;&#x6539;&#x53D8;</li>
<li>&#x5B9A;&#x4E49;&#x6570;&#x7EC4;&#x65F6;&#x5FC5;&#x987B;&#x6307;&#x5B9A;&#x6570;&#x7EC4;&#x5143;&#x7D20;&#x7C7B;&#x578B;&#xFF0C;&#x96C6;&#x5408;&#x9ED8;&#x8BA4;&#x5176;&#x4E2D;&#x6240;&#x6709;&#x5143;&#x7D20;&#x90FD;&#x662F;Object&#x3002;</li>
<li>&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x83B7;&#x53D6;&#x6570;&#x7EC4;&#x4E2D;&#x5B9E;&#x9645;&#x5B58;&#x50A8;&#x5143;&#x7D20;&#x7684;&#x4E2A;&#x6570;&#xFF0C;length&#x7528;&#x6765;&#x83B7;&#x53D6;&#x6570;&#x7EC4;&#x7684;&#x957F;&#x5EA6;&#x3002;&#x96C6;&#x5408;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;size()&#x83B7;&#x53D6;&#x96C6;&#x5408;&#x4E2D;&#x5B9E;&#x9645;&#x5B58;&#x50A8;&#x7684;&#x5143;&#x7D20;&#x4E2A;&#x6570;&#x3002;</li>
<li>&#x96C6;&#x5408;&#x4EE5;&#x501F;&#x53E3;&#x548C;&#x7C7B;&#x7684;&#x5F62;&#x5F0F;&#x5B58;&#x5728;&#xFF0C;&#x5C31;&#x6709;&#x5C01;&#x88C5;&#x3001;&#x7EE7;&#x627F;&#x3001;&#x591A;&#x6001;&#x7B49;&#x7C7B;&#x7684;&#x7279;&#x6027;&#x3002;</li>
</ol>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="017集合.html" class="navigation navigation-prev " aria-label="Previous page: 017集合">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="018泛型.html" class="navigation navigation-next " aria-label="Next page: 018泛型">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"017集合2","level":"2.1.18","depth":2,"next":{"title":"018泛型","level":"2.1.19","depth":2,"path":"books/java/018泛型.md","ref":"books/java/018泛型.md","articles":[]},"previous":{"title":"017集合","level":"2.1.17","depth":2,"path":"books/java/017集合.md","ref":"books/java/017集合.md","articles":[]},"dir":"ltr"},"config":{"plugins":["search-pro","code","back-to-top-button","theme-comscore","intopic-toc","flexible-alerts","expandable-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"intopic-toc":{"selector":".markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4, .markdown-section h5, .markdown-section h6","mode":"nested","maxDepth":6,"isCollapsed":true,"isScrollspyActive":true,"visible":true,"label":"In this article"},"search-pro":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"back-to-top-button":{},"flexible-alerts":{"style":"callout","note":{"label":"Note","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"Tip","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"Warning","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"Attention","icon":"fa fa-ban","className":"danger"}},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"作者","lang":"zh-cn","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"图书编号","variables":{},"title":"书名","gitbook":"*","description":"描述"},"file":{"path":"books/java/017集合2.md","mtime":"2022-08-11T12:59:00.649Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-03-01T12:24:55.135Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/anchor.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/gumshoe.polyfills.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

